package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.ShippingAddress;
import com.ruoyi.system.mapper.ShippingAddressMapper;
import com.ruoyi.system.service.ShippingAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author HP
 * @Date 2021/3/9
 * @Description TODO
 */
@Service
public class ShippingAddressServiceImpl implements ShippingAddressService {
    @Autowired
    private ShippingAddressMapper shippingAddressMapper;
    @Override
    public List<ShippingAddress> queryById(String user_id) {
        return shippingAddressMapper.queryById(user_id);
    }

    @Override
    public int saveShippingAddress(ShippingAddress shippingAddress) {
        return shippingAddressMapper.saveShippingAddress(shippingAddress);
    }

    @Override
    public int deleteAddress(int addressId) {
        return  shippingAddressMapper.deleteAddress(addressId);
    }
}
